package com.ruoyi.system.service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.ruoyi.system.domain.SysWithdraw;
import com.ruoyi.system.vo.WithdrawStatisticsRes;
import com.ruoyi.system.vo.req.SysWithdrawReq;

/**
 * 代付订单Service接口
 *
 * @author Ericcc
 * @date 2021-03-16
 */
public interface ISysWithdrawService
{
    /**
     * 查询代付订单
     *
     * @param withdrawId 代付订单ID
     * @return 代付订单
     */
    public SysWithdraw selectSysWithdrawById(Long withdrawId);

    /**
     * 查询代付订单列表
     *
     * @param sysWithdraw 代付订单
     * @return 代付订单集合
     */
    public List<SysWithdraw> selectSysWithdrawList(SysWithdraw sysWithdraw);

    /**
     * 新增代付订单
     *
     * @param sysWithdraw 代付订单
     * @return 结果
     */
    public int insertSysWithdraw(SysWithdrawReq sysWithdraw);

    /**
     * 修改代付订单
     *
     * @param sysWithdraw 代付订单
     * @return 结果
     */
    public int updateSysWithdraw(SysWithdraw sysWithdraw);

    /**
     * 批量删除代付订单
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteSysWithdrawByIds(String ids);

    /**
     * 删除代付订单信息
     *
     * @param withdrawId 代付订单ID
     * @return 结果
     */
    public int deleteSysWithdrawById(Long withdrawId);

    /**
     * 查询代付统计
     * @param sysWithdraw
     * @return
     */
    WithdrawStatisticsRes selectSysWithdrawStatistics(SysWithdraw sysWithdraw);

    /**
     * 查询单位时间内成功代付金额
     * @param beginTime
     * @return
     */
    BigDecimal selectSysWithdrawAmount(Integer userCode,Date beginTime);

    /**
     * 查询处理中的代付金额
     * @param userCode
     * @return
     */
    BigDecimal selectSysProcceedWithdraw(Integer userCode);

    /**
     * 获取代理底下商户代付列表
     * @param sysWithdraw
     * @return
     */
    List<SysWithdraw> selectSysAgentWithdrawList(SysWithdraw sysWithdraw);

    /**
     * 获取代理底下商户代付统计
     * @param sysWithdraw
     * @return
     */
    WithdrawStatisticsRes selectSysAgentWithdrawStatistics(SysWithdraw sysWithdraw);

    /**
     * 查询单位时间内代理底下商户成功代付金额
     * @param userCode
     * @param beginTime
     * @return
     */
    BigDecimal selectAgentSysWithdrawAmount(Integer userCode, Date beginTime,long parentId);

    /**
     * 获取高级代理底下商户代付列表
     * @param sysWithdraw
     * @return
     */
    List<SysWithdraw> selectSysHighAgentWithdrawList(SysWithdraw sysWithdraw);

    /**
     * 获取高级代理底下商户代付统计
     * @param sysWithdraw
     * @return
     */
    WithdrawStatisticsRes selectSysHighAgentWithdrawStatistics(SysWithdraw sysWithdraw);

    /**
     * 查询单位时间内高级代理底下商户成功代付金额
     * @param userCode
     * @param beginTime
     * @return
     */
    BigDecimal selectHighAgentSysWithdrawAmount(Integer userCode, Date beginTime,long parentId);
}
